
<h2>Confirmation</h2>

<% post = @reservation.post %>
<% member = @reservation.member %>

<p class="confirmtext">The ressource <%= link_to(post.title, post_path(post)) %> is booked for :<br /> <em><%= @reservation.start_date.strftime('%A %d %B %Y') %></em> between <em><%= @reservation.start_date.strftime('%H:%M')%></em> and <em><%= @reservation.user_end_date.strftime('%H:%M')%></em>.<br />Your reservation number is : <strong><em><%= @reservation.id %></em></strong></p>

<% if (session[:member_id] == @reservation.member_id) %>
	<p><a href="/" class="positivel">Make another reservation?</a></p>
	<% if (@reservation.user_end_date > Time.now)%>
		<p><%= link_to('<img src="/stylesheets/plugins/buttons/icons/key.png" alt=""/> Edit', {:controller => 'reservations', :action => 'edit', :id => @reservation.id}, :class => 'button neutral') %>
		<%= link_to('<img src="/stylesheets/plugins/buttons/icons/cross.png" alt=""/> Cancel', {:controller => 'reservations', :action => 'destroy', :id => @reservation.id}, :method => :delete, :class => 'button negative', :confirm => 'Are you sure? This cannot be cancelled.') if @reservation.start_date > Time.now %></p>
	<% else %>
		<p>This reservation's date is past the current date and time, and cannot be edited or cancelled.</p>
	<% end %>
<% end %>

<!--  <p>By member: <%= link_to(member.login, member_path(member)) %></p> -->